<template>
  <div class="category">
    <h3>{{ title }}分类</h3>

<!--  把数据传给使用插槽的组件  -->
<!--    作用域插槽-->
<!--
    :games 的对象 { "games111": [ "红色警戒", "穿越火线", "劲舞团", "超级玛丽" ], "msg": "hello" }
-->
    <slot :games111="games" msg="hello">我是默认值，slot</slot>
  </div>
</template>

<script>
export default {
  name: "Category",
  props: ["listData", "title"],
  data() {
    return {
      games: ["红色警戒", "穿越火线", "劲舞团", "超级玛丽"],
    }
  },
}
</script>

<style scoped>
.category {
  background-color: skyblue;
  width: 200px;
  height: 300px;
}

h3 {
  text-align: center;
  background-color: #e59625;
}

img {
  width: 100%;
}

/*video{
  width: 100%;
}*/
</style>